<?php

class Widget  extends Base
{
    protected $widget, $params=array(), $data=array(), $options=array();
    protected $path=WIDGETS;
    public $error;

    public function createWidget()
    {
        Sys::app()->error='Ни один виджет не загружен.';
        return '';
    }

    public function getWidget()
    {
        if(is_object($this->widget)) return $this->widget;
        else return $this;
    }

    public function getPath()
    {
        return $this->path;
    }

    public function getError()
    {
        return $this->error;
    }
}